---
title: Share previews with your team
sidebar_title: Share previews
description: Learn how to use EAS Update to send OTA updates and share previews with a team.
hasVideoLink: true
---

import { Collapsible } from '~/ui/components/Collapsible';
import { ContentSpotlight } from '~/ui/components/ContentSpotlight';
import { ProgressTracker } from '~/ui/components/ProgressTracker';
import { Terminal } from '~/ui/components/Snippet';
import { Step } from '~/ui/components/Step';
import { VideoBoxLink } from '~/ui/components/VideoBoxLink';

Updates generally fix small bugs and push small changes in between app store releases. They allow updating the non-native parts of our example app, such as JavaScript code, styling, and images.

In this chapter, we'll use [EAS Update](/eas-update/introduction/) to share changes with our team. This will help [us and our team quickly share previews](/review/overview/) of the change.

<VideoBoxLink videoId="vPKh-tNm-yI" title="Watch: How to share previews with your team" />

---

<Step label="1">

## Install expo-updates library

To initialize our project and send an update, we need to use the [`expo-updates`](/versions/latest/sdk/updates/) library. Run the following command to install it:

<Terminal cmd={['$ npx expo install expo-updates']} />

</Step>

<Step label="2">

## Configure EAS Update

To initialize our project with EAS Update, we need to follow these steps:

- Since we are using dynamic **app.config.js** for our app's configuration, adding [`updates`](/versions/latest/config/app/#updates) and [`runtimeVersion`](/eas-update/runtime-versions/#setting-runtimeversion) properties are required to make our project compatible with EAS Update. Run the following command to obtain these properties and their values from EAS and manually copy them to **app.config.js**:

<Terminal cmd={['$ eas update:configure']} />

<Collapsible summary="What about non-dynamic (app.json) projects?">

If a project doesn't use dynamic app config (uses **app.json** instead of **app.config.js**), the above command will configure our app to be compatible with EAS Update and add the right properties to **app.json** and **eas.json**.

</Collapsible>

- Re-run `eas update:configure` to continue with the setup process. A [`channel`](/eas/json/#channel) should be added to every build profile in **eas.json**:

{/* prettier-ignore */}
```json eas.json
{
  "build": {
    "development": {
      /* @hide ... */ /* @end */
      /* @info */
      "channel": "development"
      /* @end */
    },
    "ios-simulator": {
      /* @hide ... */ /* @end */
    },
    "preview": {
      /* @hide ... */ /* @end */
      /* @info */
      "channel": "preview"
      /* @end */
    },
    "production": {
      /* @hide ... */ /* @end */
      /* @info */
      "channel": "production"
      /* @end */
    }
  }
  /* @hide ... */ /* @end */
}
```

> **info** Notice that the `eas update:configure` command adds the `channel` to every build profile in **eas.json**. However, our `ios-simulator` profile extends the `development` profile and having a separate `channel` doesn't make sense. We can safely remove `ios-simulator.channel` from the above configuration.

<Collapsible summary="What is a channel?">

[Channels](/eas-update/how-it-works/#conceptual-overview) are used to group builds together. If we have an Android and iOS build, both on the app store, we can give them both a channel of production. Later, we can tell EAS Update to target the production channel, so our update will affect all builds with a production channel.

</Collapsible>

</Step>

<Step label="3">

## Create a development build

We need to create a new development build since our last build doesn't contain the `expo-updates` library. Run the following command:

<Terminal cmd={['$ eas build --platform android --profile development']} />

> We are using a development build for Android devices to demonstrate updates. However, we can use `--platform all` or `--platform ios` to create a build for both platforms or just for iOS.

After the new version of the development build is created, make sure to install it on a device.

</Step>

<Step label="4">

## Modify the JavaScript code of the app

Let's modify our example app's JavaScript code. If you are not using [Sticker Smash app](/tutorial/eas/introduction/#prerequisites), you can modify any piece of your code to see the changes in the app.

We'll modify the text of the first button in our example app that says **Choose a photo** to **Select a photo**.

```tsx app/(tabs)/index.tsx
<Button theme="primary" label="Select a photo" onPress={pickImageAsync} />
```

</Step>

<Step label="5">

## Publish an update

Instead of creating a new build to share this change with our team for testing, let's publish an update:

<Terminal cmd={['$ eas update --channel development --message "Change first button label"']} />

In the command above, we used the `development` channel. Every update is associated with a [channel name](/eas-update/how-it-works/#publishing-an-update). It is similar to every commit that we make with git, which is associated with a git branch.

So, by using the channel `development` in our build profile and then publishing an, we're asking EAS to deliver this update to builds with the `development` channel. When we make an EAS Update channel it automatically gets mapped to a branch with the same name.

After the update is published, the CLI will prompt us with information about it.

<ContentSpotlight
  alt="EAS Update published successfully with CLI prompt"
  src="/static/images/tutorial/eas/update-01.png"
/>

Click on the **Website link** to see the Update on the EAS dashboard under **Over-the-air updates** > **Update groups**:

<ContentSpotlight
  alt="EAS dashboard shows the latest published update for the development build"
  src="/static/images/tutorial/eas/update-02.png"
  className="max-w-[800px]"
/>

</Step>

<Step label="6">

## Preview the update live in a development build

To preview the live update in a development build:

- Log in to your Expo account within the development build.
- Open the **Extensions** tab.
- Look for **Branch: development** listed under **EAS Update**.
- Tap on **Open** to access the update.

</Step>

<Step label="7">

## Sharing changes with preview or production builds

Updates for non-development builds (preview or production) are automatically downloaded to the device when the app starts up and makes a request for any new updates.

Any team member running the preview or production build will receive the update with the changes we push to those specific branches.

For example, for a `preview` build, we can run:

<Terminal cmd={['$ eas update --channel preview --message "Change first button label"']} />

Here is an example where we've published an update for the `preview` build. To test the update, force close and reopen the app twice to download and view the changes:

<ContentSpotlight file="tutorial/eas/running-update-on-dev.mp4" />

</Step>

## Summary

<ProgressTracker
  currentChapterIndex={9}
  name="EAS_TUTORIAL"
  summary="We successfully configured  EAS Update to manage and publish over-the-air updates across platforms, and explored methods to fetch updates to review."
  nextChapterDescription="In the next chapter, learn about the process of triggering builds from a GitHub repository."
  nextChapterTitle="Trigger builds from a GitHub repository"
  nextChapterLink="/tutorial/eas/using-github/"
/>
